package simplefactory.factory;

import simplefactory.human.BlackHuman;
import simplefactory.human.Human;
import simplefactory.human.WhiteHuman;
import simplefactory.human.YellowHuman;

/**
 * @author heyuduo
 * @date 2022/7/3 15:21
 */
public class HumanFactory {

    public Human createHuman(Class clazz) {
//        if (clazz instanceof BlackHuman.class) {
//            return new BlackHuman();
//        } else if (clazz instanceof WhiteHuman.class) {
//            return new WhiteHuman();
//        } else if (clazz instanceof YellowHuman.class) {
//            return new YellowHuman();
//        }
        return new BlackHuman();
    }

}
